/*
 * @Author: your name
 * @Date: 2021-11-11 10:07:03
 * @LastEditTime: 2021-11-26 16:44:46
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /a1902-apractical2/vite-project/src/router/router.config.js
 */

// 路由表

import {
    Home, 
    List, 
    Hot, 
    Good,
    Login
} from '../pages'
import Lazy from '../components/Lazy'

export default [
    {
        from: '/',
        to: '/index'
    },
    {
        path: '/index',
        component: Home
    },
    {
        path: '/list',
        component: List,
        // 定义规则
        // 当isLogin 存在或为true时候 此路由需要 登陆
        // isLogin: true,
        children: [
            {
                from: '/',
                to: '/list/hot'
            },
            {
                path: '/hot',
                component: Hot
            },
            {
                path: '/good',
                component: Good
            }
        ]
    },
    {
        path: '/login',
        component: Login
    }
]